Counting Bits - Dynamic Programming - Leetcode 338 - Python